package soldier;

public class Test {
    public static void main(String[] args) {
        Soldier obj = new Soldier(); // 士兵实例

        Pistol pistolObj = new Pistol(); // 手墙实例

        obj.shoot(pistolObj);

        Sniper sniperObj = new Sniper(); // 狙击实例
        obj.shoot(sniperObj);

    }
}
